package org.jeecg.modules.system.controller;

import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.system.service.IMyPickUpBillService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import io.finer.erp.jeecg.stock.service.IStkPickUpBillService;
import io.swagger.annotations.Api;
@Api(tags="提货单")
@RestController
@RequestMapping("/stock/myPickUpBill")
public class MyPickUpController {
	@Autowired
	private IStkPickUpBillService stkPickUpBillService;
	@Autowired
	private IMyPickUpBillService pickUpBillService;
	
    /*--------------------------------子表处理-提货单详情-end----------------------------------------------*/
    @GetMapping("/addPicupEntry")
    public Result<?> addPicupEntry(@RequestParam(name = "materialId")String materialId,
    		@RequestParam(name = "ids")String ids){
    	//存储提货单详情信息。
    	ids = ids.replace(",", "");
    	Result<?> result = this.stkPickUpBillService.addPicupEntry(materialId, ids);
    	return result;
    }
    
    @GetMapping("/sendMessage")
    public Result<?> sendMessage(@RequestParam(name = "ids")String ids){
    	return pickUpBillService.sendMessage(ids);
    }
}
